﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace ST.Buz.Base.Entity
{
	/// <summary>
	/// 模块
	/// </summary>
	[Table("Sys_Module")]
	public partial class Sys_Module
	{
		[Key]
		[Column("ID")]
		public int ID { get; set; }

		/// <summary>
		/// 模块代码
		/// </summary>
		[Column("Code")]
		[StringLength(32, ErrorMessage = "{0}长度不能超过{1}")]
		public string Code { get; set; }

		/// <summary>
		/// 模块名称
		/// </summary>
		[Column("Name")]
		[Required]
		[StringLength(50, ErrorMessage = "{0}长度不能超过{1}")]
		public string Name { get; set; }

		/// <summary>
		/// 模块描述
		/// </summary>
		[Column("Comment")]
		[StringLength(50, ErrorMessage = "{0}长度不能超过{1}")]
		public string Comment { get; set; }

		/// <summary>
		/// 模块图标
		/// </summary>
		[Column("Icon")]
		[StringLength(200, ErrorMessage = "{0}长度不能超过{1}")]
		public string Icon { get; set; }

		/// <summary>
		/// 排序
		/// </summary>
		[Column("Sort")]
		public int Sort { get; set; }

		/// <summary>
		/// 是否可见
		/// </summary>
		[Column("Visible")]
		public bool Visible { get; set; }

		/// <summary>
		/// 是否系统保留
		/// </summary>
		[Column("Reserved")]
		public bool Reserved { get; set; }

		/// <summary>
		/// 创建时间
		/// </summary>
		[Column("AddDate")]
		public DateTime AddDate { get; set; }

		/// <summary>
		/// 创建人ID
		/// </summary>
		[Column("AddManID")]
		[JsonIgnore]
		public int AddManID { get; set; }

		/// <summary>
		/// 创建人
		/// </summary>
		[Column("AddManName")]
		[StringLength(20, ErrorMessage = "{0}长度不能超过{1}")]
		public string AddManName { get; set; }

		[Column("OrgID")]
		[JsonIgnore]
		public int OrgID { get; set; }
	}
}
